<template>
  <div class="m-lycifo">
    <div class="clearfix">
      <div class="cvrwrap">
        <div class="u-cover">
          <img
            :src="
              songInfo?.al?.picUrl
                ? `${songInfo?.al?.picUrl}?param =130y130`
                : require('../../common/images/bgb.png')
            "
          />
          <span class="msk mask1"></span>
        </div>
      </div>
      <div class="cnt">
        <div class="hd">
          <i class="lab u-icn"></i>
          <div class="tit">
            <em class="f-ff2">{{ songInfo?.name }}</em>
            <a href="javascirpt:;" title="播放mv" v-if="songInfo?.mv">
              <i class="u-icn-2 u-icn"></i>
            </a>
            <div class="subtit f-fs1" v-for="(it, index) in songInfo?.tns" :key="index">
              {{ it }}
            </div>
          </div>
        </div>
        <p class="des s-fc4">
          歌手：
          <span
            title="周深"
            v-html="songInfo?.ar ? meageElement(songInfo?.ar, 's-fc7') : ''"
          >
          </span>
        </p>
        <p class="des s-fc4">
          所属专辑：
          <span :title="songInfo?.al?.name">
            <a href="javascirpt:;" class="s-fc7 unline">{{ songInfo?.al?.name }}</a>
          </span>
        </p>
        <SongPageBtnFn></SongPageBtnFn>
        <SongPageLyric></SongPageLyric>
      </div>
    </div>
    <div class="lrc-user">
      <p><a href="javascript:;" class="s-fc4 f-tdu">报错</a></p>
    </div>
  </div>
</template>

<script>
import SongPageBtnFn from "@/pages/songPage/SongPageBtnFn.vue";
import SongPageLyric from "@/pages/songPage/SongPageLyric.vue";
import { meageElement } from "@/baseFnMixin/mergeName/mergeNameMixin.js";

export default {
  name: "SongInfo",
  components: { SongPageBtnFn, SongPageLyric },
  props: { songInfo: { type: Object } },
  setup() {
    return {
      meageElement,
    };
  },
};
</script>

<style lang="less" scoped>
.m-lycifo {
  margin-top: -10px;
  .cvrwrap {
    position: relative;
    float: left;
    width: 206px;
    margin-right: -226px;
  }
  .cnt {
    float: right;
    width: 414px;
    .lab {
      float: left;
      width: 54px;
      height: 24px;
      background-position: 0 -463px;
      overflow: hidden;
      vertical-align: middle;
    }
  }
  .tit {
    margin-left: 64px;
    position: relative;
    top: -6px;
    font-size: 24px;
    em {
      margin-right: 7px;
    }
  }
  .subtit {
    margin: 1px 0 5px;
    color: #bababa;
  }
  .des {
    margin: 10px 0;
  }
}
.lrc-user {
  text-align: right;
  margin-top: 48px;
  line-height: 30px;
}
.u-cover {
  position: relative;
  float: left;
  width: 198px;
  height: 198px;
  img {
    width: 130px;
    height: 130px;
    margin: 34px;
  }
  .msk {
    position: absolute;
    width: 206px;
    height: 205px;
    top: -4px;
    left: -4px;
    background-position: -140px -580px;
  }
}
.u-icn-2 {
  display: inline-block;
  width: 21px;
  height: 18px;
  background-position: 0 -18px;
}
</style>
